DEV = ramblock
obj-m += $(DEV).o

OBJ_DIR = /work/nfsroot

KERN_DIR = /home/coco/comeOnBaby/learn_embed/linux_used

all:
	make -C $(KERN_DIR) M=`pwd` modules
	
cp:
	rm -rf $(OBJ_DIR)/$(DEV).ko 
	cp $(DEV).ko $(OBJ_DIR)	

clean:
	make -C $(KERN_DIR) M=`pwd` modules clean
	rm -rf modules.order
#-----------------------------test-------------------------

TGT := main

CROSS_COMPILER_PREFIX := arm-linux-
CC := $(CROSS_COMPILER_PREFIX)gcc

$(TGT): $(TGT).c
	$(CC) -o $(TGT) $^

$(TGT)clean:
	rm -rf $(TGT)

$(TGT)cp:
	rm -rf $(OBJ_DIR)/$(TGT)	
	cp $(TGT) $(OBJ_DIR)

